package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 设备库位对应表
 * </p>
 *
 * @author mt
 * @since 2022-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_equipment_location")
public class EquipmentLocation extends Model<EquipmentLocation> {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 更新人id
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号 默认为 1
     */
    @TableField("version")
    @Version
    private String version;

    /**
     * 状态	0可用，1锁定
     */
    @TableField("status")
    private Integer status;

    /**
     * 编码
     */
    @TableField("code")
    private String code;

    /**
     * 设备id
     */
    @TableField("equipment_id")
    private Long equipmentId;

    /**
     * 设备代号
     */
    @TableField("equipment_mark")
    private Integer equipmentMark;

    /**
     * 库位id
     */
    @TableField("location_id")
    private Long locationId;

    /**
     * 库位层
     */
    @TableField("location_layers")
    private String locationLayers;

    /**
     * 库位列
     */
    @TableField("location_columns")
    private String locationColumns;

    /**
     * 顺序
     */
    @TableField("sequence")
    private Integer sequence;

    /**
     * 货架0 a货架 1 b货架
     */
    @TableField("goods_shelves")
    private Integer goodsShelves;

    /**
     * 库位名
     */
    @TableField("location_name")
    private String locationName;

    /**
     * 是否为工序准备箱 0是工序处，1是缓存区。当is_empty为空时使用
     */
    @TableField("is_process")
    private Integer isProcess;


    public static final String ID = "id";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATOR_ID = "creator_id";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String STATUS = "status";

    public static final String CODE = "code";

    public static final String EQUIPMENT_ID = "equipment_id";

    public static final String EQUIPMENT_MARK = "equipment_mark";

    public static final String LOCATION_ID = "location_id";

    public static final String LOCATION_LAYERS = "location_layers";

    public static final String LOCATION_COLUMNS = "location_columns";

    public static final String SEQUENCE = "sequence";

    public static final String GOODS_SHELVES = "goods_shelves";

    public static final String LOCATION_NAME = "location_name";

    public static final String IS_PROCESS = "is_process";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
